<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>

<chiptrack:checkLogon sourcePage="/marketingReport.do?action=pricereport" />

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<script>
var dateElement = "";
    function openCalendar(dateValue)
    {
	dateElement = dateValue;
  	newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
  	newWindow.moveTo(550,180);
  	newWindow.focus();
    }
	function assignDate(passedValue)
    {   
	dateElement.value=passedValue;
	window.focus();
    }

function historyChecked()
{

if(document.priceReport.priceHistory.checked==false){
   document.priceReport.reportType.value="NonPrice";
   document.priceReport.periodically[0].disabled=true;
   document.priceReport.periodically[1].disabled=true;
}
else{ 
	document.priceReport.periodically[0].disabled=false;
	document.priceReport.periodically[1].disabled=false;
	document.priceReport.reportType.value="PriceReport";
	}
	
}

function dateRange(){

var period="";
var cat="";


if(document.priceReport.reportType.value=='PriceReport' && document.priceReport.prompt2.value=='' && document.priceReport.prompt3.value==''){

for (counter = 0; counter < priceReport.periodically.length; counter++)
{
if (priceReport.periodically[counter].checked){
	period = priceReport.periodically[counter].value;
	}
}

if ( period=="byMonth")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_product_default_History_month.rpt";
	document.priceReport.submit();
}

else if ( period=="byQuarter")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_product_default_history_quarter.rpt";
	document.priceReport.submit();
}

}

else if(document.priceReport.reportType.value=='PriceReport' && document.priceReport.prompt2.value!='' && document.priceReport.prompt3.value==''){

for (counter = 0; counter < priceReport.periodically.length; counter++)
{
if (priceReport.periodically[counter].checked){
	period = priceReport.periodically[counter].value;
	}
}

if ( period=="byMonth")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_CustProd_History_month.rpt";
	document.priceReport.submit();
}

else if ( period=="byQuarter")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_CustProd_History_quarter.rpt";
	document.priceReport.submit();
}

}

else if(document.priceReport.reportType.value=='PriceReport' && document.priceReport.prompt2.value=='' && document.priceReport.prompt3.value!=''){

for (counter = 0; counter < priceReport.periodically.length; counter++)
{
if (priceReport.periodically[counter].checked){
	period = priceReport.periodically[counter].value;
	}
}

if ( period=="byMonth")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_product_History_month.rpt";
	document.priceReport.submit();
}

else if ( period=="byQuarter")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_Product_History_quarter.rpt";
	document.priceReport.submit();
}

}

else if(document.priceReport.reportType.value=='PriceReport' && document.priceReport.prompt2.value!='' && document.priceReport.prompt3.value!=''){

for (counter = 0; counter < priceReport.periodically.length; counter++)
{
if (priceReport.periodically[counter].checked){
	period = priceReport.periodically[counter].value;
	}
}

if ( period=="byMonth")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_custprod_History_month.rpt";
	document.priceReport.submit();
}

else if ( period=="byQuarter")
{
	document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_custprod_History_quarter.rpt";
	document.priceReport.submit();
}

}

else if(document.priceReport.reportType.value=='NonPrice' && document.priceReport.prompt2.value=='' && document.priceReport.prompt3.value==''){

document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_product_default.rpt";
document.priceReport.submit()

}

else if(document.priceReport.reportType.value=='NonPrice' && document.priceReport.prompt2.value!='' && document.priceReport.prompt3.value==''){
document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_custprod.rpt";
document.priceReport.submit()
}

else if(document.priceReport.reportType.value=='NonPrice' && document.priceReport.prompt2.value=='' && document.priceReport.prompt3.value!=''){
document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_product.rpt";
document.priceReport.submit()
}

else if(document.priceReport.reportType.value='NonPrice' && document.priceReport.prompt2.value!='' && document.priceReport.prompt3.value!=''){
document.priceReport.action="<%=chipTracContext%>/jsp/report.jsp?nameReport=Marketing/Pricing/Price_Report_custprod.rpt";
document.priceReport.submit()
}
}

function cancelAndGoBack() {
    document.location = "jsp/marketing/marketing.jsp";
 }
</script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<form name =priceReport method="post">

<!-- Top Header Start-->

<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@ include file="/jsp/marketing/marketing_report_menu.jsp" %>
<!-- end of the side navigations -->
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->



<center><span class="NArialW">Price Reports</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>


  <table border="0" width="90%" align=right>

	<tr>
      <td width="15%"><font class="NArialL">Customer</font></td>
      <td width="20%"><font class="NArialL">

      	<select name="prompt2" class="txfield"  >
     <option value="">Select Customer</option>
    <logic:iterate id="customerSelectList" name="customerSelectList">
	<logic:notEqual name="customerSelectList" value="null">
 <option value = <bean:write name="customerSelectList" property="customerId"/>>
 <bean:write name="customerSelectList" property="customerName"/>
 </option>
 </logic:notEqual>
 </logic:iterate> 
   </select>  
	    
	  </td>

      	<td width="5%">&nbsp;</td>
      <td width="35%"><font class="NArialL">Product Name <br> (Mfg Part Number)</font></td>
      <td width="20%"><font class="NArialL">

	  <select name="prompt3" class="txfield"  >
     <option value="">Select Product Name</option>
    <logic:iterate id="mktgPartNumberSelectList" name="mktgPartNumberSelectList">
	<logic:notEqual name="mktgPartNumberSelectList" value="null">
 <option value = <bean:write name="mktgPartNumberSelectList" property="productId"/>>
 <bean:write name="mktgPartNumberSelectList" property="manufacturingPartNo"/>
 </option>
 </logic:notEqual>
 </logic:iterate> 
   </select>  
	  
	  </td>
		<td width="15%">&nbsp;</td>
    </tr>

   
   <BR>
    <tr><td colsapn=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

   <BR>
    <tr>
      <td width="15%"><font class="NArialL">From-Date</font></td>
      <td width="20%"><font class="NArialL">
      	<input type="text" name="prompt0" size="20" class="txfield"></font>&nbsp;&nbsp;&nbsp;
      	<a href="javascript:openCalendar(document.priceReport.prompt0)">
		<img border="0" src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=18 width=18></a></td>
      	<td width="5%">&nbsp;</td>
      <td width="15%"><font class="NArialL">To-Date</font></td>
      <td width="20%"><font class="NArialL">
      	<input type="text" name="prompt1" size="20" class="txfield"></font>&nbsp;&nbsp;&nbsp;
      	 <a href="javascript:openCalendar(document.priceReport.prompt1)">
		<img border="0" src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=18 width=18></a></td>
		<td width="15%">&nbsp;</td>
    </tr>

    <tr><td colsapn=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr><td colsapn=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr><td colspan=5>
	    	
	<input type="checkbox" name="priceHistory" onClick="javascript:historyChecked();" >
	<font class="NArialL">Price History</font>
    </td></tr>
    <tr><td colsapn=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

    <tr><td colspan=5>
	    	<input type="radio" name="periodically" value="byMonth" checked disabled>
	    		<font class="NArialL">By Month</font>&nbsp;&nbsp;&nbsp;&nbsp;
	    	<input type="radio" name="periodically" value="byQuarter" disabled>
	    		<font class="NArialL">By Quarter</font>
    </td></tr>
    <tr><td colsapn=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
	<tr>
      <td colspan=5 align=center><a href="javascript:dateRange()"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" width="53" height="17"></a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      
      <a href="javascript:cancelAndGoBack();" onMouseOver="window.status='Click here to go back to Marketing menu';return true" onMouseOut="window.status='';return true">
      <img border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17"></a></td>
    </tr>
  </table>
  <input type="hidden" name="reportType" value="NonPrice">
  <input type="hidden" name="subReport" value="Price_Report_CustProd.rpt">


<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD bgColor=#493B76 colSpan=2><IMG height=2 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"
      width=800></TD></TR>
  <TR>
    <TD vAlign=top colSpan=2>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR align=right>
          <TD noWrap background=<%=chipTracContext%>/jsp/includes/images/blue_gradient_bg2.gif><SPAN
            class=copyright>&nbsp;&nbsp;Copyright 2002 <A class=copyright
            target=_new href="#">Scalarsoft
            Inc.</A></SPAN><BR><SPAN class=footer_element><A class=footer_element
            href="#">Contact
            Us</A></SPAN></TD>
          <TD align=right bgColor=#80C455></TD></TR></TBODY>
		</TABLE>
		</TD>
  </TR>
  <TR>
    <TD bgColor=#493B76 colSpan=2><IMG height=2 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"
      width=800></TD></TR>
</TBODY>
</TABLE>
<!-- footer end here -->
</form>
</BODY>
</HTML>
